<?php if($comment){ ?>
    <?php foreach($comment as $v){ ?>
        <li>
            <div class="sb">
                <div class="top_box">
                    <?php if(!$v['image']){ ?>
                        <?php if($v['sex'] ==1){ ?>
                            <div class="tx"><img src="<?php echo $this->staticsPath."/img/tx1.jpg" ?>" /></div>
                        <?php }else{ ?>
                            <div class="tx"><img src="<?php echo $this->staticsPath."/img/tx2.jpg" ?>" /></div>
                        <?php } ?>
                    <?php }else{ ?>
                        <div class="tx"><img src="<?php echo $v['image']; ?>" /></div>
                    <?php } ?>
                    <div class="wz">
                        <div class="name"><?php echo $v['user_name']  ?></div>
                        <div class="time"><?php echo date('Y/m/d H:i',$v['create_time'])  ?></div>
                    </div>
                    <?php if($user_info->role==2){ ?>
                        <?php if($v['pid']==$user_info->relation_id){ ?>
                            <div class="an">
                                <div data-id="<?php echo $v['id']  ?>" class="zan"><span style="color: maroon; font-weight: 900; display: block; text-align: center; margin-left: 0px; width: 40px;"><?php echo intval($v['good'])  ?></span></div>
                                <div data-id="<?php echo $v['id']  ?>" class="pinglun"></div>
                            </div>
                        <?php } ?>
                    <?php }else{ ?>
                        <div class="an">
                            <div data-id="<?php echo $v['id']  ?>" class="zan"><span style="color: maroon; font-weight: 900; display: block; text-align: center; margin-left: 0px; width: 40px;"><?php echo intval($v['good'])  ?></span></div>
                            <div data-id="<?php echo $v['id']  ?>" class="pinglun"></div>
                        </div>
                    <?php } ?>
                </div>
                <div class="clearfix"></div>
            </div>
            <div class="con"><?php echo CHtml::decode($v['content']);  ?></div>
            <?php $comment_info =  BookComment::model()->getComment($v['id']); ?>
            <div class="pinglunbox">
                <div  id="plbox_<?php echo $v['id'] ?>"  class="plbox">
            <?php if($comment_info){ ?>

                <?php foreach($comment_info as $vv){ ?>

                        <div class="sb">
                            <div class="top_box">
                                <?php if($vv['role']==1){ ?>
                                    <div class="name"><span class="nm"><?php echo $vv['user_name'] ?></span>：<?php echo $vv['content'] ?></div>
                                <?php }elseif($vv['role']==2){ ?>
                                    <div class="name"><span class="nm"><?php echo $v['user_name'].'的'.$vv['is_relation'] ?></span>：<?php echo $vv['content'] ?></div>
                                <?php }elseif($vv['role']==3){ ?>
                                    <div class="name"><span class="nm"><?php echo $vv['user_name'].'教师' ?></span>：<?php echo $vv['content'] ?></div>
                                <?php } ?>
                            </div>
                            <div class="clearfix"></div>
                        </div>

                <?php } ?>

            <?php } ?>
                </div>
            </div>
        </li>
    <?php } ?>
<?php } ?>